import request from '@/utils/request'

// 查询用户充值列表
export function listWithdrawals(query) {
  return request({
    url: '/sys/app/user/withdrawals/page',
    method: 'post',
    data: query
  })
}

//审核用户提现
export function auditWithdrawals(id, remark) {
  return request({
    url: `/sys/app/user/withdrawals/audit/${id}`,
    method: 'put',
    params: {remark}
  })
}

// 查询用户充值详细
export function getWithdrawals(id) {
  return request({
    url: '/user/withdrawals/' + id,
    method: 'get'
  })
}

// 新增用户充值
export function addWithdrawals(data) {
  return request({
    url: '/user/withdrawals',
    method: 'post',
    data: data
  })
}

// 修改用户充值
export function updateWithdrawals(data) {
  return request({
    url: '/user/withdrawals',
    method: 'put',
    data: data
  })
}

// 删除用户充值
export function delWithdrawals(id) {
  return request({
    url: `/sys/app/home/banner/${id}`,
    method: 'delete'
  })
}
